//
//  MyBidJobsListViewModel.swift
//  ezyform
//
//  Created by MoennigQ on 24/12/18.
//  Copyright © 2018 Client.Solution Pty Ltd. All rights reserved.
//

import UIKit

class MyBidJobsListViewModel: BaseService {
    func getMyBidJobsList(_ queryStr: String = ""){
        
        //type=1 My Bid Job
        var url : String = APIConfig.getRequestAPIForV2(APIConfig.BidJobsListAPI) + queryStr + "&type=2"
        //将原始的 url 编码为合法的 url
        url = url.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!
        let alRequest = ALRequest.init(mainURL: url, method: .get, headers: RequestConstant.AuthTokenParam, paramDict: nil, successBlock: { (result, otherInfo) -> Void in
            
            self.returnBlock(result,otherInfo)
            
        }) {(code, obj) -> Void in
            self.errorBlock?(code, obj)
        }
        alRequest.startRequest()
    }
}
